export const Session = {
  set(key, value) {
    return sessionStorage.setItem(key, JSON.stringify(value));
  },
  get(key) {
    return JSON.parse(sessionStorage.getItem(key) || '');
  },
  del(key) {
    return sessionStorage.removeItem(key);
  },
  read(key) {
    const res = this.get(key);
    this.del(key);
    return res;
  },
};
